<template>
  <view class="content">
    <!-- <image class="logo" src="@/static/logo.png"></image> -->
    <!--uni-app-->
    
    <tui-grid>
      <block v-for="(item,index) in dataList" :key="index">
        <tui-grid-item :cell="2" @click="detail">
          <view class="t-list">
            <view class="t-image">
              <image src="@/static/logo.png"></image>
            </view>
            <view class="t-avtor">
              <image src="@/static/logo.png"></image>
              <text class="tui-grid-label">{{item.name}}</text>
            </view>
            <view class="t-omit">{{item.size}}</view>
            <view class="t-comment">
              <view>点赞：500</view>
              <view>评论：200</view>
            </view>
          </view>
        </tui-grid-item>
      </block>
    </tui-grid>
    <tui-tabbar :current="current"  backdropFilter backgroundColor="#f8f8f8" color="#777" selectedColor="#AC9157" @click="tabbarSwitch"></tui-tabbar>
  </view>
</template>

<script>
  export default {
    data() {
			return {
        current: 0,
        dataList: [
          { name: "refresh", size: '这里是标题这里是标题这里是标题这里是标题这里是标题这里是标题这里是标题' },
          { name: "refresh", size: '这里是标题这里是标题这里是标题这里是标题这里是标题这里是标题这里是标题' },
          { name: "refresh", size: '这里是标题这里是标题这里是标题这里是标题这里是标题这里是标题这里是标题' },
          { name: "refresh", size: '这里是标题这里是标题这里是标题这里是标题这里是标题这里是标题这里是标题' },
          { name: "refresh", size: '这里是标题这里是标题这里是标题这里是标题这里是标题这里是标题这里是标题' },

        ]
      }
    },
    onLoad: function() {
    },
    methods: {
      tabbarSwitch() {

      },
    },
  }
</script>

<style lang="scss" scoped>
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.t-list {
  .t-image {
    width: 100%;
    height: 100%;
    image {
      width: 100%;
      height: 300rpx;
    }
  }
  .t-avtor {
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    image {
      width: 80rpx;
      height: 80rpx;
      border-radius: 100%;
    }
    .tui-grid-label {
      font-size: 42rpx;
    }
  }
  .t-omit {
    margin: 15rpx 0 15rpx 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
  .t-comment {
    margin: 15rpx 0 30rpx 0;
    display: flex;
    justify-content: space-between;
  }
}
</style>
